Skip to content

rustc: Check if def_path_hash_to_def_id is populated before accessing. #42737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2017

Conversation

fhahn
Copy link
Contributor

@fhahn fhahn commented Jun 18, 2017

Without this patch, there is an ICE when running rustc with
RUST_LOG=debug. This patch updates extract_def_id to check if the map
has been populated before accessing it. This fixes the problem, but
maybe we do not need to compute the incremental hashes maps in the first
place when we are not in incremental mode?

… it.

Without this patch, there is an ICE when running rustc with
RUST_LOG=debug. This patch updates extract_def_id to check if the map
has been populated before accessing it. This fixes the problem, but
maybe we do not need to compute the incremental hashes maps in the first
place when we are not in incremental mode?
@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@fhahn
Copy link
Contributor Author

fhahn commented Jun 18, 2017

It looks like @michaelwoerister added def_path_hash_to_def_id in f854f8b , so it might make sense for him to have a look?

@michaelwoerister
Copy link
Member

@bors r+

Good catch, @fhahn!

At the moment we are always building (part of) the incremental hashes map in order to compute the SVH, which as a kind of global hash of a crate's contents and used for various consistency checks. But we may want to review if the last remaining uses of the SVH implemented in a cheaper way after #42677 has been fixed. Originally the SVH was supposed to capture ABI compatibility between crates -- but it has become far more sensitive than that since then.

@bors
Copy link
Collaborator

bors commented Jun 19, 2017

📌 Commit 8723f28 has been approved by michaelwoerister

@bors
Copy link
Collaborator

bors commented Jun 19, 2017

⌛ Testing commit 8723f28 with merge 5ce5126...

bors added a commit that referenced this pull request Jun 19, 2017
rustc: Check if def_path_hash_to_def_id is populated before accessing.

Without this patch, there is an ICE when running rustc with
RUST_LOG=debug. This patch updates extract_def_id to check if the map
has been populated before accessing it. This fixes the problem, but
maybe we do not need to compute the incremental hashes maps in the first
place when we are not in incremental mode?
@bors
Copy link
Collaborator

bors commented Jun 19, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: michaelwoerister
Pushing 5ce5126 to master...

@bors bors merged commit 8723f28 into rust-lang:master Jun 19, 2017
@fhahn fhahn deleted the rust-log-crash branch June 19, 2017 10:56
pnkfelix added a commit to pnkfelix/rust that referenced this pull request Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants